import request from '@/utils/request'

// 上传的客户列表
export function clientList(params) {
  return request({
    url:'/visitCustomer/getVisitCustomers',
    method:'post',
    data:params
  })
}

// 可派单的员工
// export function staffList(params) {
//     return request({
//       url:'/visitCustomer/getVisitCustomers',
//       method:'post',
//       data:params
//     })
//   }
  
// 进行匹配
export function genreateResult(params) {
  return request({
    url:'/visitCustomer/genreateResult',
    method:'post',
    data:params
  })
}


// 进行匹配
export function getErrorListByRequest(component) {
  return request({
    url:'/visitCustomer/getErrorVOs',
    method:'post',
    data:{}
  }).then(res => {
    for (let index = 0; index < res.data.length; index++) {
      component.errorList.push( res.data[index]);
    }
  })
}


// 匹配结果
export function getGenreateResult(params) {
  return request({
    url:'/visitCustomer/getGenreateResult',
    method:'post',
    data:params
  })
}

// 修改结果
export function updateGenreateResult(params) {
  return request({
    url:'/visitCustomer/updateGenerateResult',
    method:'post',
    data:params
  })
}

// 获取更新结果
export function getUpdateGenreateResult(params) {
  return request({
    url:'/visitCustomer/getUpdateGenerateResult',
    method:'post',
    data:params
  })
}



// 通过审核
export function approved(params) {
  return request({
    url:'/visitCustomer/passVerification',
    method:'post',
    data:params
  })
}

// 派单历史
export function dispatchHistory(params) {
  return request({
    url:'/visitCustomer/getVisistCustomers',
    method:'post',
    data:params
  })
}
// 派单历史搜索
export function dispatchHistorySearch(params) {
  return request({
    url:'/visitCustomer/statisticsVisitBySearch',
    method:'post',
    data:params
  })
}

// 派单历史当日列表
export function dispatchHistoryList(params) {
  return request({
    url:'/visitCustomer/lookVisit',
    method:'post',
    data:params
  })
}

// 探马拉去客户
export function visitCustomer(params) {
  return request({
    url:'/visitCustomer/exploringHorses',
    method:'post',
    data:params
  })
}

// 探马筛选条件
export function visitCustomerSearch(params) {
  return request({
    url:'/visitCustomer/explorColumn',
    method:'post',
    data:params
  })
}

// 审核通过回传信息
export function callbackInformation(params) {
  return request({
    url:'/visitCustomer/customerTransfer',
    method:'post',
    data:params
  })
}

// 审核通过回传信息
export function allAlgorithmResults(params) {
  return request({
    url:'/visitCustomer/getAllAlgResult',
    method:'post',
    data:params
  })
}

export function removeClient(params) {
  return request({
    url:'/visitCustomer/removeClient',
    method:'post',
    data:params
  })
} 